# 爬虫网页下载器

# 导入requests库
import requests


class HtmlDownloader(object):

    # 下载网页
    def download(self, url):
        if url is None:
            return None
        response = requests.get(url)
        if response.status_code == 200:
            return response.text
        return None

# 测试
# downloader = HtmlDownloader()
# html = downloader.download("http://127.0.0.1:8848/xiaomi/index.html")
# print(html)